package com.cc2019.buke.user.Activity.help;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;

import com.cc2019.buke.R;

public class AboutSuggestionActivity extends AppCompatActivity implements View.OnClickListener {
    private Button button;
    private EditText content;
    private EditText wechat;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about_suggestion);
        button=(Button) findViewById(R.id.commit_button);
        button.setOnClickListener(this);
        content=(EditText) findViewById(R.id.contents);
        wechat=(EditText) findViewById(R.id.wechat);
    }

    @Override
    public void onClick(View v) {
        String content_=content.getText().toString();
        String wechat_=wechat.getText().toString();
        if(!TextUtils.isEmpty(content_)&&!TextUtils.isEmpty(wechat_)) {
            Toast.makeText(this, "提交成功！我们将听取您的宝贵意见", Toast.LENGTH_SHORT).show();
        }else if(!TextUtils.isEmpty(content_)&&TextUtils.isEmpty(wechat_)){
            Toast.makeText(AboutSuggestionActivity.this,"请留下您的联系方式~",Toast.LENGTH_SHORT).show();;
        }else  if(TextUtils.isEmpty(content_)&&!TextUtils.isEmpty(wechat_)){
            Toast.makeText(AboutSuggestionActivity.this,"请留下您的宝贵意见~",Toast.LENGTH_SHORT).show();
        }
    }
}